import request from '@/utils/request'
export const getComments = params => {
  return request({
    url: '/v1_0/comments',
    method: 'get',
    params,
  })
}
export const addLike = target => {
  return request({
    url: '/v1_0/comment/likings',
    method: 'post',
    data: {
      target,
    },
  })
}

export const delLike = target => {
  return request({
    url: '/v1_0/comment/likings/' + target,
    method: 'DELETE',
  })
}

export const addComment = data => {
  return request({
    url: '/v1_0/comments',
    method: 'post',
    data,
  })
}
